home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / rshd.z / rshd
Encoding:
Text File  |  2001-04-17  |  18.3 KB  |  331 lines

  1.  
  2.  
  3.  
  4. RRRRSSSSHHHHDDDD((((1111MMMM))))                                                              RRRRSSSSHHHHDDDD((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      rshd - remote shell server
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////uuuussssrrrr////eeeettttcccc////rrrrsssshhhhdddd [[[[----aaaallllnnnnLLLL]]]]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _R_s_h_d is the server for the _r_c_m_d(3N) routine and, consequently, for the
  16.      _r_s_h(1C) program.  The server provides remote execution facilities with
  17.      authentication based on privileged port numbers from trusted hosts.  The
  18.      ----aaaa option verifies the remote host name and address match on all incoming
  19.      connections.  Normally this check is performed only for connections from
  20.      hosts in the local domain.  The ----llll option disables validation using
  21.      ._r_h_o_s_t_s files.  Transport-level keep-alive messages are enabled unless
  22.      the ----nnnn option is present.  The use of keep-alive messages allows sessions
  23.      to be timed out if the client crashes or becomes unreachable.  The ----LLLL
  24.      option causes all successful accesses to be logged to _s_y_s_l_o_g_d(1M) as
  25.      _a_u_t_h._i_n_f_o messages.  These options should specified in the
  26.      /_e_t_c/_i_n_e_t_d._c_o_n_f file (see _i_n_e_t_d(1M)).
  27.  
  28.      _R_s_h_d listens for service requests at the port indicated in the ``cmd''
  29.      service specification; see _s_e_r_v_i_c_e_s(4).  When a service request is
  30.      received the following protocol is initiated:
  31.  
  32.      1)  The server checks the client's source port.  If the port is not in
  33.          the range 512-1023, the server aborts the connection.
  34.  
  35.      2)  The server reads characters from the socket up to a null (`\0') byte.
  36.          The resultant string is interpreted as an ASCII number, base 10.
  37.  
  38.      3)  If the number received in step 2 is non-zero, it is interpreted as
  39.          the port number of a secondary stream to be used for the ssssttttddddeeeerrrrrrrr.  A
  40.          second connection is then created to the specified port on the
  41.          client's machine.  The source port of this second connection is in
  42.          the range 513-1023.
  43.  
  44.      4)  The server checks the client's source address and requests the
  45.          corresponding host name (see _g_e_t_h_o_s_t_b_y_a_d_d_r(3N), _h_o_s_t_s(4) and
  46.          _n_a_m_e_d(1M)).  If the hostname cannot be determined, the dot-notation
  47.          representation of the host address is used.
  48.  
  49.      5)  A null terminated user name of at most 16 characters is retrieved on
  50.          the initial socket.  This user name is interpreted as the user
  51.          identity on the cccclllliiiieeeennnntttt's machine.
  52.  
  53.      6)  A null terminated user name of at most 16 characters is retrieved on
  54.          the initial socket.  This user name is interpreted as a user identity
  55.          to use on the sssseeeerrrrvvvveeeerrrr's machine.
  56.  
  57.      7)  A null terminated command to be passed to a shell is retrieved on the
  58.          initial socket.  The length of the command is limited by the upper
  59.          bound on the size of the system's argument list.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. RRRRSSSSHHHHDDDD((((1111MMMM))))                                                              RRRRSSSSHHHHDDDD((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      8)  _R_s_h_d then validates the user according to the following steps.  The
  75.          local (server-end) user name is looked up in the password file.  If
  76.          the lookup fails, the connection is terminated.  _R_s_h_d then tries to
  77.          validate the user using _r_u_s_e_r_o_k(3N), which uses the file
  78.          /_e_t_c/_h_o_s_t_s._e_q_u_i_v and the ._r_h_o_s_t_s file found in the user's home
  79.          directory.  If the user is not the super-user, (user id 0), the file
  80.          /_e_t_c/_h_o_s_t_s._e_q_u_i_v is consulted for a list of hosts considered
  81.          ``equivalent''.  If the client's host name is present in this file,
  82.          the authentication is considered successful.  If the lookup fails, or
  83.          the user is the super-user, then the file ._r_h_o_s_t_s in the home
  84.          directory of the remote user is checked for the machine name and
  85.          identity of the user on the client's machine.  If this lookup fails,
  86.          the connection is terminated.  The ----llll option prevents _r_u_s_e_r_o_k(3N)
  87.          from doing any validation based on the user's ``.rhosts'' file,
  88.          unless the user is the superuser.
  89.  
  90.          Under Trusted IRIX/CMW, only the first field of the /etc/hosts.equiv
  91.          and $HOME/.rhosts files is relevant to the system.  The second field
  92.          is ignored as a comment.  This behavior places a restriction on the
  93.          rsh and rlogin programs, which do not allow unchallenged access
  94.          (access without demanding a password) unless the remote user name and
  95.          user ID are exactly identical to the local user name and user ID.  If
  96.          a different name or user ID is used, the user is prompted for a
  97.          password that authenticates the user's identity in the usual manner.
  98.          The MAC label of the $HOME/.rhosts file must be dominated by the MAC
  99.          label of the login session, otherwise the user will be prompted for a
  100.          password.  It is recommended that the $HOME/.rhosts file be labeled
  101.          such that it is dominated by all other labels that the user can login
  102.          with.
  103.  
  104.      9)  If the file /_e_t_c/_n_o_l_o_g_i_n exists and the user is not the super-user,
  105.          the connection is closed.
  106.  
  107.      10) A null byte is returned on the initial socket and the command line is
  108.          passed to the normal login shell of the user.  The shell inherits the
  109.          network connections established by _r_s_h_d.
  110.  
  111. SSSSHHHHAAAARRRREEEE IIIIIIII AAAACCCCTTTTIIIIOOOONNNNSSSS
  112.      If the Share II system is installed and enabled, then the following
  113.      privilege and resource checks are made immediately after validation
  114.      checks are passed but before the shell is started:
  115.  
  116.      1.  If your _nnnn_oooo_llll_oooo_gggg_iiii_nnnn flag is set, or you already have another connection
  117.          and your _oooo_nnnn_eeee_llll_oooo_gggg_iiii_nnnn flag is set, then you are denied connection.
  118.  
  119.      2.  If a disk usage exceeds its soft disk limit in any of your domains,
  120.          then a message is printed and you are given a _w_a_r_n_i_n_g.  If you
  121.          accumulate too many warnings, further connection attempts are denied
  122.          and you must see your subadministrator to rectify the situation.
  123.          Whenever you connect with no disk usages in excess of any soft
  124.          limits, all your accumulated warnings are cleared.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. RRRRSSSSHHHHDDDD((((1111MMMM))))                                                              RRRRSSSSHHHHDDDD((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      3.  If you do not have permission to use an _r_s_h connection, as determined
  141.          by the terminal permission flag _tttt_eeee_rrrr_mmmm_iiii_nnnn_aaaa_llll_...._ffff_llll_aaaa_gggg_...._rrrr_ssss_hhhh, then you are
  142.          denied connection.
  143.  
  144.      4.  Some installations place limits on terminal connect-time, which apply
  145.          equally to connection by way of _r_s_h.  If you have already reached
  146.          your connect-time limit, then you are denied connection.  Otherwise,
  147.          if you have a limit, your remaining connect-time is printed.
  148.  
  149.      If all of these checks are passed, _rrrr_ssss_hhhh_dddd proceeds normally.
  150.  
  151.      For each new instance of a remotely initiated process, rshd first reads
  152.      the configuration file _////_eeee_tttt_cccc_////_dddd_eeee_ffff_aaaa_uuuu_llll_tttt_////_rrrr_ssss_hhhh_dddd.  Currently the only switch in
  153.      this file is SVR4_SIGNALS, which indicates if SVR4 signal defaults should
  154.      be used, and defaults to `YES'. This means that processes spawned by rshd
  155.      will run with the SIGXFSZ and SIGXCPU signals disabled (i.e. ignored).
  156.      For CPU and filesize resource limiting to work correctly, this file
  157.      should be edited and SVR4_SIGNALS set to `NO', so that these signal
  158.      retain their default behaviour, which is to terminate the process.
  159.  
  160. FFFFIIIILLLLEEEESSSS
  161.      _////_eeee_tttt_cccc_////_llll_iiii_mmmm_cccc_oooo_nnnn_ffff        The compiled Share II configuration file (machine
  162.                          readable).
  163.  
  164.      _////_eeee_tttt_cccc_////_dddd_eeee_ffff_aaaa_uuuu_llll_tttt_////_rrrr_ssss_hhhh_dddd   Default behaviour configuration file
  165.  
  166. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  167.      login(1), rsh(1C), rexecd(1M), rcmd(3N), ruserok(3N), share(5)
  168.  
  169. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  170.      Except for the last one listed below, all diagnostic messages are
  171.      returned on the initial socket, after which any network connections are
  172.      closed.  An error is indicated by a leading byte with a value of 1 (0 is
  173.      returned in step 10 above upon successful completion of all the steps
  174.      prior to the execution of the login shell).
  175.  
  176.      ````````llllooooccccuuuusssseeeerrrr ttttoooooooo lllloooonnnngggg''''''''
  177.      The name of the user on the client's machine is longer than 16
  178.      characters.
  179.  
  180.      ````````rrrreeeemmmmuuuusssseeeerrrr ttttoooooooo lllloooonnnngggg''''''''
  181.      The name of the user on the remote machine is longer than 16 characters.
  182.  
  183.      ````````ccccoooommmmmmmmaaaannnndddd ttttoooooooo lllloooonnnngggg ''''''''
  184.      The command line passed exceeds the size of the argument list (as
  185.      configured into the system).
  186.  
  187.      ````````LLLLooooggggiiiinnnn iiiinnnnccccoooorrrrrrrreeeecccctttt....''''''''
  188.      No password file entry for the user name existed.  (Logged to the
  189.      _s_y_s_l_o_g_d(1M) daemon as an _a_u_t_h._n_o_t_i_c_e message.)
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. RRRRSSSSHHHHDDDD((((1111MMMM))))                                                              RRRRSSSSHHHHDDDD((((1111MMMM))))
  203.  
  204.  
  205.  
  206.      ````````NNNNoooo rrrreeeemmmmooootttteeee ddddiiiirrrreeeeccccttttoooorrrryyyy....''''''''
  207.      The _c_h_d_i_r command to the home directory failed.  (Logged as an
  208.      _a_u_t_h._n_o_t_i_c_e message.)
  209.  
  210.      ````````PPPPeeeerrrrmmmmiiiissssssssiiiioooonnnn ddddeeeennnniiiieeeedddd....''''''''
  211.      The authentication procedure described above failed.  (Logged as an
  212.      _a_u_t_h._n_o_t_i_c_e message.)
  213.  
  214.      ````````CCCCoooonnnnnnnneeeeccccttttiiiioooonnnn rrrreeeecccceeeeiiiivvvveeeedddd uuuussssiiiinnnngggg IIIIPPPP ooooppppttttiiiioooonnnnssss ((((iiiiggggnnnnoooorrrreeeedddd))))''''''''
  215.      The remote host tried to use explicit IP source routing.
  216.  
  217.      ````````CCCCoooonnnnnnnneeeeccccttttiiiioooonnnn ffffrrrroooommmm <<<<hhhhoooosssstttt>>>> oooonnnn iiiilllllllleeeeggggaaaallll ppppoooorrrrtttt''''''''
  218.      The remote host used a nonprivileged port.
  219.  
  220.      ````````CCCCaaaannnn''''tttt ffffiiiinnnndddd nnnnaaaammmmeeee ffffoooorrrr <<<<aaaaddddddddrrrreeeessssssss>>>>''''''''
  221.      No hostname was found for the IP address.  The authentication procedure
  222.      described above will use the IP address.
  223.  
  224.      ````````HHHHoooosssstttt aaaaddddddddrrrr <<<<xxxx>>>> nnnnooootttt lllliiiisssstttteeeedddd ffffoooorrrr hhhhoooosssstttt <<<<yyyy>>>>''''''''
  225.      The remote host's name and address did not match.  The authentication
  226.      procedure described above will use the IP address instead of the name.
  227.  
  228.      ````````CCCCaaaannnn''''tttt mmmmaaaakkkkeeee ppppiiiippppeeee....''''''''
  229.      The pipe needed for the ssssttttddddeeeerrrrrrrr, wasn't created.
  230.  
  231.      ````````TTTTrrrryyyy aaaaggggaaaaiiiinnnn....''''''''
  232.      A _f_o_r_k by the server failed.
  233.  
  234.      ````````<<<<sssshhhheeeellllllllnnnnaaaammmmeeee>>>>:::: ............''''''''
  235.      The user's login shell could not be started.  This message is returned on
  236.      the connection associated with the ssssttttddddeeeerrrrrrrr, and is not preceded by a flag
  237.      byte.
  238.  
  239.      The Share II specific diagnostic messages are listed as follows:
  240.  
  241.      ````````WWWWaaaarrrrnnnniiiinnnngggg <<<<XXXX>>>> ooooffff <<<<YYYY>>>>:::: ssssoooofffftttt ddddiiiisssskkkk lllliiiimmmmiiiitttt eeeexxxxcccceeeeeeeeddddeeeedddd....''''''''
  242.      One of your domains has a disk usage in excess of its soft limit.
  243.  
  244.      ````````CCCCoooonnnnnnnneeeeccccttttiiiioooonnnn ddddeeeennnniiiieeeedddd....  TTTToooooooo mmmmaaaannnnyyyy wwwwaaaarrrrnnnniiiinnnnggggssss....''''''''
  245.      You have reached your warning limit.  See your subadministrator.
  246.  
  247.      ````````CCCCoooonnnnnnnneeeeccccttttiiiioooonnnn ddddeeeennnniiiieeeedddd....  AAAAllllrrrreeeeaaaaddddyyyy llllooooggggggggeeeedddd iiiinnnn ---- oooonnnnllllyyyy oooonnnneeee llllooooggggiiiinnnn aaaalllllllloooowwwweeeedddd....''''''''
  248.      You are already connected to the system and your _oooo_nnnn_eeee_llll_oooo_gggg_iiii_nnnn flag is set.
  249.  
  250.      ````````CCCCoooonnnnnnnneeeeccccttttiiiioooonnnn ddddeeeennnniiiieeeedddd....  CCCCuuuurrrrrrrreeeennnnttttllllyyyy bbbbaaaarrrrrrrreeeedddd ffffrrrroooommmm llllooooggggggggiiiinnnngggg iiiinnnn....''''''''
  251.      Your _nnnn_oooo_llll_oooo_gggg_iiii_nnnn flag is set.
  252.  
  253.      ````````CCCCoooonnnnnnnneeeeccccttttiiiioooonnnn ddddeeeennnniiiieeeedddd....  NNNNoooo ppppeeeerrrrmmmmiiiissssssssiiiioooonnnn ttttoooo uuuusssseeee tttthhhhiiiissss tttteeeerrrrmmmmiiiinnnnaaaallll....''''''''
  254.      You are not allowed to log in at this terminal because of a clear
  255.      _tttt_eeee_rrrr_mmmm_iiii_nnnn_aaaa_llll_...._ffff_llll_aaaa_gggg_...._rrrr_ssss_hhhh flag.
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. RRRRSSSSHHHHDDDD((((1111MMMM))))                                                              RRRRSSSSHHHHDDDD((((1111MMMM))))
  269.  
  270.  
  271.  
  272.      ````````YYYYoooouuuu hhhhaaaavvvveeee aaaa rrrreeeemmmmaaaaiiiinnnniiiinnnngggg tttteeeerrrrmmmmiiiinnnnaaaallll ccccoooonnnnnnnneeeecccctttt----ttttiiiimmmmeeee ooooffff <<<<YYYY>>>>....''''''''
  273.      You may use this connection until you have used up your remaining
  274.      connect-time, at which point you are forced to disconnect.
  275.  
  276.      ````````CCCCoooonnnnnnnneeeeccccttttiiiioooonnnn ddddeeeennnniiiieeeedddd....  TTTTeeeerrrrmmmmiiiinnnnaaaallll ccccoooonnnnnnnneeeecccctttt----ttttiiiimmmmeeee lllliiiimmmmiiiitttt eeeexxxxcccceeeeeeeeddddeeeedddd....''''''''
  277.      You have already reached your terminal connect-time limit.
  278.  
  279.      ````````SSSShhhhaaaarrrreeee nnnnooootttt ccccoooonnnnffffiiiigggguuuurrrreeeedddd ---- nnnnoooo lllliiiimmmmiiiitttt cccchhhheeeecccckkkkssss....''''''''
  280.      The configuration file is unreadable for some reason, so terminal
  281.      privileges, connect-time limits and disk space limits could not be
  282.      checked.
  283.  
  284. BBBBUUUUGGGGSSSS
  285.      The authentication procedure used here assumes the integrity of each
  286.      client machine and the connecting medium.  This is insecure, but is
  287.      useful in an ``open'' environment.
  288.  
  289.      A facility to allow all data exchanges to be encrypted should be present.
  290.  
  291.      A more extensible protocol should be used.
  292.  
  293. NNNNOOOOTTTTEEEESSSS
  294.      _r_s_h_d will set the _L_A_N_G environment variable if it is specified in
  295.      $$$$HHHHOOOOMMMMEEEE////....llllaaaannnngggg.
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.